{% extends "lists/base.html" %}
{% load staticfiles %}
{% load crispy_forms_tags %}

{% block title %}
Create a list
{% endblock %}

{% block extrahead %}
{% endblock %}


{% block breadcrumb %}
<li><a href="{% url "home" %}">Home</a></li>
<li><a href="{% url "lists" %}">Lists</a></li>
<li class="current">Create a list</li>
{% endblock %}

{% block content %}
<div class="row">
  <div class="large-12 columns">
    <h1>Create a list</h1>
    <p>Lists are created using Markdown. A short Markdown syntax help you can find at the end of this page.</p>
    <p>You can either write your list here or pull it from a URL. Using URLs is a practical way of maintaining your list somewhere else, e.g. with versioning and PRs on GitHub, and still having it simply displayed here.</p>
    <p>Private field lets you decide whether other people can see your list or not.</p>
    {% crispy form %}
  </div>
</div>
<div class="row">
  <div class="large-12 columns">
    <pre># header level 1 (h1)
## header level 2 (h2)
##### header level 2 (h5)

This is a
paragraph.

And another paragraph.

* Unordered
* List

1. Ordered
2. List

We _both_ are *emphasized*. We __both__ are **bold**.

Please [click here](http://reSRC.io) to discover reSRC.
Automatic links : &lt;http://reSRC.io&gt;.</pre>
  </div>
</div>
{% endblock %}

{% block last_body %}
<script>
  var delay = (function() {
    var timer = 0;
    return function(callback, ms) {
      clearTimeout (timer);
      timer = setTimeout(callback, ms);
    };
  })();

  $('#id_url').keyup(function() {
    delay(function() {
      if($('#id_url').val().length > 0) {
        $('#div_id_mdcontent').hide();
      } else {
        $('#div_id_mdcontent').show();
      }
    }, 100);
  });
</script>
{% endblock %}
